import { createRouter, createWebHistory } from 'vue-router'
import versionRoutes from './modules/version'
import userRoutes from './modules/user'
import authRoutes from './modules/auth'
import systemRoutes from './modules/system'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/sign-in',
      name: 'SignIn',
      component: () => import('@/views/auth/signIn.vue')
    },
    {
      path: '/',
      name: 'workbench',
      component: () => import('@/views/layout/DefaultLayout.vue'),
      redirect: '/auth',
      children: [
        // {
        //   path: '/authorize/view',
        //   name: 'Overview',
        //   component: () => import('@/views/overview/Overview.vue'),
        //   meta: {
        //     title: '首页概览',
        //     showPageHeader: false,
        //     showBack: false,
        //     currentActiveMenu: 'Overview'
        //   }
        // },
        ...authRoutes,
        ...versionRoutes,
        ...userRoutes,
        ...systemRoutes
      ]
    },
    {
      path: '/:pathMatch(.*)*',
      name: 'NotFound',
      component: () => import('@/views/NotFound.vue')
    }
  ]
})

export default router
